using System;
using System.Collections.Generic;
using System.Text;
using Directory.Model;
using System.Data;

namespace Directory.IDAL
{
	public interface IItem
	{
		ItemInfo CreateItem(int categoryId, string title, string keyWords, string description, string linkUrl, string logoPath, DateTime createDate, string authorName,
			string checkerName, int topState, bool IsRecommand, bool isChecked, out Directory.Model.ItemInfo.ErrorCode ErrorCode);
		void DeleteItem(int itemId);
		void UpdateItem(ItemInfo item, out ItemInfo.ErrorCode ErrorCode);
		ItemInfo GetItemInfo(int itemId);
		IList<ItemInfo> GetItemsInCategory(int categoryId, bool isChecked, int pageIndex, int pageSize, out int totalRecords);
		void UpdateRecommandState(int itemId, bool IsRecommand);
		IList<ItemInfo> SearchItems(int categoryId, string keywords, int pageIndex, int pageSize, out int totalRecords);
		DataSet GetContributionRank(int pageIndex, int pageSize, out int totalRecords);
		void UpdateCheckState(int itemId, bool isChecked);
		IList<ItemInfo> GetItemsByRecommand(bool isRecommand, int pageIndex, int pageSize, out int totalRecords);
		int GetItemsCount(bool isChecked);
		IList<ItemInfo> GetRecentAdded(int count);
		IList<ItemInfo> GetItemsInCategories(int[] categoryIds, bool isChecked, bool recursive, int pageIndex, int pageSize, out int totalRecords);
	}
}
